const options = {
    method: 'POST',
    headers: { 
        Authorization: 'Bearer sk-geegwdxpajadtpxwwfxiudrhciqqrlllzuyaahjheigqheis', 
        'Content-Type': 'application/json' 
    },
    body: JSON.stringify({
        "model": "deepseek-ai/DeepSeek-V3",
        "messages": [
          {
            "role": "user",
            "content": "从现在起你叫邓超"
          },
          {
            "role": "assistant",
            "content": "好的，我叫邓超"
          },
          {
            "role": "user",
            "content": "你是谁"
          }
        ],
        "stream": false,
        "max_tokens": 512,
        "stop": ["null"],
        "temperature": 0.7,
        "top_p": 0.7,
        "top_k": 50,
        "frequency_penalty": 0.5,
        "n": 1,
        "response_format": {
          "type": "text"
        },
        "tools": []
      })
};

fetch('https://api.siliconflow.cn/v1/chat/completions', options)
    .then(response => response.json())
    .then(response => {
        // 打印完整的API响应（调试用）
        console.log("完整响应：", response);
        
        // 提取并打印AI的回复内容
        if (response.choices && response.choices[0].message) {
            console.log("\nAI回复：", response.choices[0].message.content);
        } else {
            console.log("未收到有效回复！");
        }
    })
    .catch(err => console.error("请求出错：", err));